import { typeAdminUser } from '@/types';
import { User } from '@element-plus/icons-vue';
// 前端展示页面类型定义

// API 响应类型
export interface ApiResponse<T = any> {
  code: number
  message: string
  remarks?: string | null
  data: T
  timestamp?: string
}

// 登录表单
export interface LoginForm {
  username: string
  password: string
}

// 注册表单
export interface RegisterForm {
  username: string
  email: string
  password: string
}

// 用户信息
export interface User {
  id: number
  username: string
  email: string
  nickname?: string
  avatar?: string
  is_active: boolean
  created_at: string
  updated_at: string
}


// 分页查询参数
export interface PageQuery {
  page?: number
  pageSize?: number
  keyword?: string
}

// 分页响应数据 - 与后端SuccessExtra保持一致
export interface PageData<T> {
  code: number
  message: string
  remarks?: string | null
  data: T[]
  total: number
  page: number
  page_size: number
  timestamp: string
}